﻿@model IEnumerable<Order>
@{
    ViewBag.Title = "OrderList";
}

<h2>Order List</h2>

<table class="table">
    <tr>
        <th>Id</th>
        <th>Customer</th>
        <th>Order Date</th>
        <th>Receiver</th>
        <th>Amount</th>
        <th></th>
    </tr>
    @foreach (var o in Model)
    {
    <tr>
        <td>#@o.Id</td>
        <td>@o.Customer.Fullname</td>
        <td>@Html.FormatValue(o.OrderDate, "{0:MM/dd/yyyy}")</td>
        <td>@o.Receiver</td>
        <td>@o.Amount</td>
        <td>
            <a href="/Order/OrderDetail/@o.Id">Detail</a>
        </td>
    </tr>   
    }
</table>